home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / CFUNCTS.LZH / GCLS.C < prev    next >
Text File  |  1986-12-15  |  970b  |  23 lines

  1. gcls()
  2. {
  3. char far *p;           /* Memory Pointer                */
  4. int count;             /* for loop variable.            */
  5. int card_type;         /* Card type:  1 = Color         *
  6.                         *                2 = Monochrome */
  7.  
  8.                        /* Determine screen memory based on card type */
  9.          card_type = card();
  10.          if (card_type == 1)
  11.            p = 0xb8000000;     /* Color card.           */
  12.          else
  13.            p = 0xb0000000;     /* Monochrome card.      */
  14.  
  15.                                /* 2000 = 25 columns * 80 rows        */
  16.          for (count = 0; count < 2000; ++count)
  17.              {
  18.              *p = 0x0020;      /* Write blank character to screen    */
  19.              ++p;              /* Increment to attribute.            */
  20.              *p = 0x0007;      /* Set attribute to normal.           */
  21.              ++p;              /* Increment to next location.        */
  22.              }
  23. }